package com.chaoXing.work1;

public class Circle {
    private static double PI=3.1415926;
    private double radius;
    private String color;

    public Circle() {
    }

    public Circle(double radius, String color) {
        this.radius = radius;
        this.color = color;
    }

    public double getArea(){
        return PI*radius*radius;
    }

    public double getPerimeter(){
        return PI*2*radius;
    }

    @Override
    public String toString() {
        return "******MyPriter is Canon-ip110" +"\n"+
                "Circle{" +
                "radius=" + radius +
                ", color='" + color + '\'' +
                "getArea()="+getArea()+"\t\t"+
                "getPerimeter()="+getPerimeter()+
                "}\n"+
                "------------------------------------";
    }
}
